<%= render :partial => 'navigation' %>
<table>
  <tr>
    <th>ID</th>
    <th>Status</th>
    <th>Total amount</th>
    <th>Size</th>
    <th>Created at</th>
    <th>Updated at</th>
    <th></th>
  </tr>
  <% for order in @orders %>
    <tr>
      <td align="right"><%= order.id %></td>
      <td align="right"><%= order.status %></td>
      <td align="right"><%= order.total %></td>
      <td align="right"><%= order.books.size %></td>
      <td align="right"><%= order.created_at.strftime("%Y-%m-%d %I:%M") %></
      td>
      <td align="right"><%= order.updated_at.strftime("%Y-%m-%d %I:%M") %></
      td>
      <td><%= link_to "View", :action => 'show', :id => order %></td>
    </tr>
  <% end %>
</table>
<%= will_paginate @orders %>